package thrift

import (
	"context"
	"gitee.com/tietang/terrace-go/v2/example/apis"
	"gitee.com/tietang/terrace-go/v2/example/apis/thrift/gen/handlers"
)

func NewAccountServerHandler() *AccountHandler {
	return &AccountHandler{}
}

type AccountHandler struct {
}

func (a *AccountHandler) OpenAccount(ctx context.Context, req *handlers.AccountCreateReq) (res *handlers.AccountRes, err error) {
	account, err := &apis.AccountDTO{}, nil //todo
	return ToAccountRes(account), err
}
